package by.jtraining.london.web.interceptor;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;
import static by.jtraining.london.constants.Constants.LECTOR;

public class TrainerInterceptor extends AbstractUserInterceptor implements Interceptor{

	private static final long serialVersionUID = 83362627592277108L;	

	@Override
	public String intercept(ActionInvocation invocation) throws Exception {
		if(!checkUserRole(invocation, LECTOR)) return INDEX; 
		return invocation.invoke();
	}
}
